package sunyu.tools.kafka.consumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.listener.MessageListener;
import org.springframework.stereotype.Component;

@Component
public class DefaultKafkaConsumer implements MessageListener<Integer, String> {

    private static final Logger logger = LoggerFactory.getLogger(Thread.currentThread().getClass());

    @Override
    public void onMessage(ConsumerRecord<Integer, String> record) {
        logger.info(record.value());
    }
}
